﻿using System;

namespace Tools.MAME
{
    ///-------------------------------------------------------------------------------------------------
    /// <summary> Category/version info for a single item. </summary>
    ///-------------------------------------------------------------------------------------------------
    public class CatVerItemInfo
    {
        #region Properties

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Gets or sets the name of the rom. </summary>
        /// <value> The name of the rom. </value>
        ///-------------------------------------------------------------------------------------------------
        public String RomName { get; private set; }

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Gets or sets the category. </summary>
        /// <value> The category. </value>
        ///-------------------------------------------------------------------------------------------------
        public String Category { get; private set; }

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Gets or sets the sub-category. </summary>
        /// <value> The sub category. </value>
        ///-------------------------------------------------------------------------------------------------
        public String SubCategory { get; private set; }

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Gets or sets a flag indicating whether this game is marked as mature. </summary>
        /// <value> True if this game is marked as mature, false if not. </value>
        ///-------------------------------------------------------------------------------------------------
        public bool IsMature { get; private set; }

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Gets or sets the version that the game was added. </summary>
        /// <value> The version that the game was added. </value>
        ///-------------------------------------------------------------------------------------------------
        public String VersionAdded { get; set; }

        #endregion

        #region Constructors

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Constructor. </summary>
        /// <param name="romName">     The name of the rom. </param>
        /// <param name="category">    The category. </param>
        /// <param name="subCategory"> The sub category. </param>
        /// <param name="isMature">    True if this game is marked as mature, false if not. </param>
        ///-------------------------------------------------------------------------------------------------
        public CatVerItemInfo(String romName, String category, String subCategory, bool isMature)
        {
            RomName = romName;
            Category = category;
            SubCategory = subCategory;
            IsMature = isMature;
            VersionAdded = null;
        }

        #endregion

        #region Override

        ///-------------------------------------------------------------------------------------------------
        /// <summary> Returns a string that represents the current object. </summary>
        /// <returns> A string that represents the current object. </returns>
        ///-------------------------------------------------------------------------------------------------
        public override string ToString()
        {
            return String.Format("Name: {0}  Category: {1}  Sub-Category: {2}  IsMature: {3}  VersionAdded: {4}",
                RomName, Category, SubCategory, IsMature, VersionAdded);
        }

        #endregion
    }
}
